Every function exported by a plug-in, and most callback functions provided by a host application, return one of a common set of return codes. The definition and meaning of the return code depends on what type of function is returning them.
As an example, suppose a plug-in author has implemented the ID_OpenImage function. If the function encounters an invalid parameter, it should return a value of IDE_InvalidParam from the set of ID_StatusCodes.
Plug-ins are encouraged to use the set of defined status codes, but they are not restricted to them. Each plug-in can define its own error codes, starting at -1000. When a plug-in returns one of these error codes, the host application will attempt to call the appropriate GetError function, if it is exported. For instance, if the plug-in is of the Image Decode type, the host application will attempt to call ID_GetError to retrieve a string describing the error.
Below is a table listing the return codes that correspond to each plug-in type:
Plug-In Type | Status Codes |